home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
tclib20.zip
/
TIMEHK.H
< prev
next >
Wrap
C/C++ Source or Header
|
1988-12-03
|
919b
|
25 lines
/* TCHK 2.0 - Howard Kapustein's Turbo C library 12-3-88 */
/* Copyright (C) 1988, Howard Kapustein. All rights reserved. */
/* timehk.c - Howard Kapustein's time routines */
#ifndef TIMEHK_HEADER
#define TIMEHK_HEADER 1
#include <howard.h>
/* function prototypes */
int pause(int wait); /* pause like delay or till keypress, returns scan code */
char *timetostr(struct time *tsource, boolean seconds, boolean hundreds, boolean ampm); /* convert time to string */
struct time *strtotime(char *source); /* convert a string to time */
boolean time_convert(void *source, void *dest, int stype, int dtype);
#ifndef TIME_DEFINE
#define isPM(hr) ((hr>=12)?TRUE:FALSE)
#define tohour(hr) ((hr>12)?hr-12:(hr==0?12:hr))
#define to24hour(hr) ((hr==0)?24:hr) /* 0-23 = 24-hour clock */
#define TIME_DEFINE 1
#endif
#endif /* TIMEHK_HEADER */